'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const f = require('./common/map.cjs'),
  w = require('./common/null.cjs'),
  y = require('./common/seq.cjs'),
  T = require('./common/string.cjs'),
  O = require('./core/bool.cjs'),
  n = require('./core/float.cjs'),
  s = require('./core/int.cjs'),
  j = require('./core/schema.cjs'),
  k = require('./json/schema.cjs'),
  p = require('./yaml-1.1/binary.cjs'),
  u = require('./yaml-1.1/omap.cjs'),
  g = require('./yaml-1.1/pairs.cjs'),
  m = require('./yaml-1.1/schema.cjs'),
  q = require('./yaml-1.1/set.cjs'),
  o = require('./yaml-1.1/timestamp.cjs'),
  c = new Map([
    ['core', j.schema],
    ['failsafe', [f.map, y.seq, T.string]],
    ['json', k.schema],
    ['yaml11', m.schema],
    ['yaml-1.1', m.schema],
  ]),
  l = {
    binary: p.binary,
    bool: O.boolTag,
    float: n.float,
    floatExp: n.floatExp,
    floatNaN: n.floatNaN,
    floatTime: o.floatTime,
    int: s.int,
    intHex: s.intHex,
    intOct: s.intOct,
    intTime: o.intTime,
    map: f.map,
    null: w.nullTag,
    omap: u.omap,
    pairs: g.pairs,
    seq: y.seq,
    set: q.set,
    timestamp: o.timestamp,
  },
  N = {
    'tag:yaml.org,2002:binary': p.binary,
    'tag:yaml.org,2002:omap': u.omap,
    'tag:yaml.org,2002:pairs': g.pairs,
    'tag:yaml.org,2002:set': q.set,
    'tag:yaml.org,2002:timestamp': o.timestamp,
  };
function $(a, i) {
  let t = c.get(i);
  if (!t)
    if (Array.isArray(a)) t = [];
    else {
      const e = Array.from(c.keys())
        .filter(r => r !== 'yaml11')
        .map(r => JSON.stringify(r))
        .join(', ');
      throw new Error(
        `Unknown schema "${i}"; use one of ${e} or define customTags array`,
      );
    }
  if (Array.isArray(a)) for (const e of a) t = t.concat(e);
  else typeof a == 'function' && (t = a(t.slice()));
  return t.map(e => {
    if (typeof e != 'string') return e;
    const r = l[e];
    if (r) return r;
    const b = Object.keys(l)
      .map(h => JSON.stringify(h))
      .join(', ');
    throw new Error(`Unknown custom tag "${e}"; use one of ${b}`);
  });
}
exports.coreKnownTags = N;
exports.getTags = $;
